<?php defined('SYSPATH') or die('No direct script access.') ?>
<table id="table-items" class="table table-hover">
	<tr>
		<th>#</th>
		<th>время операции</th>
		<th>тип операции</th>
		<th>значение</th>
	</tr>
<?php
$i = 0;
foreach ($balance_log as &$row)
{
	$i++;
?>
	<tr>
		<td><?php echo $i ?></td>
		<td><?php echo date('Y.m.d H:i:s',$row['time']) ?></td>
		<td><?php echo $row['value']<0?'списание':'зачисление' ?></td>
		<td><?php echo !empty($row['orderid'])?HTML::anchor($controller.'/items/'.$row['orderid'],$row['value'] .' <span class="rouble">Р</span>'):$row['value'] .' <span class="rouble">Р</span>' ?></td>
	</tr>
<?php
}
?>
</table>